/*
 * @Author: mei
 * @Date: 2021-05-08 15:23:41
 * @LastEditTime: 2021-05-08 16:07:17
 * @Description: 这个头文件用于提取类型信息(萃取机)
 */
#ifndef MYSTL_TYPE_TRAITS_H
#define MYSTL_TYPE_TRAITS_H
#include <type_traits>

namespace mystl
{
    template <typename T, T v>
    struct m_integral_constant
    {
        static constexpr T value = v;
    };
    template <bool b>
    using m_bool_constant = m_integral_constant<bool, b>;

    typedef m_bool_constant<true> m_true_type;
    typedef m_bool_constant<false> m_false_type;

    //is pair
    template <class T1, class T2>
    struct pair;

    template <class T>
    struct is_pair : mystl::m_false_type
    {
    };

    template <class T1, class T2>
    struct is_pair<mystl::pair<T1, T2> > : mystl::m_true_type
    {
    };
};

#endif
